﻿@{
    ViewBag.Title = "Index";
}
@section LayoutHeadContainer{
<link href="/css/facebox.css" media="screen" rel="stylesheet" type="text/css" />
<link type="text/css" href="/css/mcdropdown/jquery.mcdropdown.min.css" rel="stylesheet" media="all" />
<script src="/scripts/facebox.js" type="text/javascript"></script>
<script type="text/javascript" src="/js/mcdropdown/jquery.mcdropdown.js"></script>
<script type="text/javascript" src="/js/mcdropdown/jquery.bgiframe.js"></script>
<style>
.ui-jqgrid .ui-jqgrid-labels{ background:#ffffff; padding-top:5px}
</style>
<script>
    $(function () {
        $(".btn").button();
    });
</script>
}
<div id="middle-sdo1">
  <div id="middle">
    <!--Message-->
    <div class="message">北京电力工程公司成果库系统欢迎您！</div>
    <!--Feature Box-->
    <div style=" float:right"><button id="uploadfile" class="btn" onclick="$.facebox({ ajax: '/folder/editfolder?id=0&category=0'})">创建文件夹</button></div>
    <div class="clearfix"> </div>
    <div style="text-align:center"><table id="list1" style="margin:auto"></table></div>
  </div>
</div>
<script>
    $("#list1").jqGrid({
        treeGrid: true,
        treeGridModel: 'adjacency',
        ExpandColumn: 'menu',
        ExpandColClick: true,
        url: '/folder/list?id=0',
        //url: '/tree1.html',
        datatype: 'json',
        colNames: ["文件夹名称","子文件夹数量","操作"],
        colModel: [{
            name: 'name',
            index: 'name',
            width: 500,
            hidden: false,
            sortable: false
        },
        {
            name: 'childcount',
            index: 'childcount',
            width: 90,
            align:"center",
            hidden: false,
            sortable: false
        },
        {
            name: 'oparet',
            index: 'oparet',
            width: 200,
            align: "center",
            sortable: false,
            title: false
            @(!Achievement.Web.Common.UserInfo.ValidataRole(1)?",hidden: true":"")
            //formatter: OperatFunc
        }],
        pager: false,
        width: '500',
        viewrecords: true,
        autowidth: true,
        shrinkToFit: true,
        multiselect: true,
        height: 'auto',
        caption: '文件夹'
    });
    function OperatFunc(cellvalue, options, rowdata) {
        return "";
    }

    function deletefolder(id) {
        if (confirm("删除操作不可逆，您确认删除吗？")) {
            window.location.href = "/folder/deletefolder?id=" + id;
        }
    }
</script>